import java.util.PriorityQueue;
import java.util.Queue;

public class TestDemo {
    public static void main(String[] args) {
        int[] arr = {27,15,19,18,28,34,65,49,25,37};
        TestHeap testHeap = new TestHeap();
        testHeap.createHeap(arr);
        testHeap.offer(80);
        System.out.println(testHeap.poll());
//        System.out.println(testHeap.poll());
        System.out.println("=====================");
        testHeap.heapSort();
        System.out.println();

        PriorityQueue<Integer> priorityQueue = new PriorityQueue<>();


//        PriorityQueue<Integer> priorityQueue = new PriorityQueue<>();
//        priorityQueue.offer(27);
//        priorityQueue.offer(15);
//        priorityQueue.offer(18);
//        priorityQueue.offer(28);
//        priorityQueue.offer(34);
//        priorityQueue.offer(65);
//        priorityQueue.offer(49);
//        priorityQueue.offer(25);
//        priorityQueue.offer(37);
//        System.out.println(priorityQueue.peek());// 15 --- 最小堆

    }
}
